<template>
  <div>
    <div class="table-box">
      <el-table
        :data="tableData"
        stripe
        style="width: 100%"
        border
        :header-cell-style="{
            /* 样式名称 ： 属性 */
            'font-weight':'bold',
            'text-align':'center',
             'color':'#4d5259'
            }"
        :cell-style="{
            /* 样式名称 ： 属性 */
            'text-align': 'center',
            }"
      >
        <el-table-column prop="recordId" label="冲卡编号" width="150"></el-table-column>
        <el-table-column prop="agentId" label="被冲卡代理ID" width="180"></el-table-column>
        <el-table-column prop="addCardNumber" label="冲卡数量" width="150"></el-table-column>
        <el-table-column prop="addCardTime" label="冲卡时间" width="250"></el-table-column>
        <el-table-column label="操作">
          <template slot-scope="scope">
            <el-button size="mini" @click="handleEdit(scope.$index, scope.row)">
              <!-- <i class="iconfont">&#xe661;</i> -->
              删除记录
            </el-button>
            <!-- <el-button size="mini" type="primary" @click="addRoomCard(scope.$index, scope.row)"> -->
            <!-- <i class="iconfont">&#xe66c;</i> -->
            <!-- 给他冲卡 -->
            <!-- </el-button> -->
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>
<script>
import { getAddCardRecord } from "@/api";
import store from "@/store/index.js";
export default {
  data() {
    return {
      userInfo: {},
      tableData: []
    };
  },
  mounted() {
    this.userInfo = store.getters.getUserInfo;
    getAddCardRecord(this.userInfo.agentId).then(res => {
      if (res.code == 200) {
        this.tableData = res.data;
      }
    });
  }
};
</script>